package com.ls.thread.ch01.demo01;

public class CalThread extends Thread {

	@SuppressWarnings("static-access")
	@Override
	public void run() {
		for(int index=1;index<=10;index++){
			
			//子类不能抛出父类更大的异常，所以只能用try catch
			//休息0.5秒
			try {
				Thread.currentThread().sleep(500);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
			System.out.println(this.getName()+":"+index);
		}
		
	}
}
